using lucere.index.write;
using lucere.io;

namespace lucere.index.read
{
    /// <summary>
    /// IndexInput that knows how to read the byte slices written
    /// by Posting and PostingVector.  We read the bytes in
    /// each slice until we hit the end of that slice at which
    /// point we read the forwarding address of the next slice
    /// and then jump to it.
    /// </summary>
    public interface IByteSliceReader : IIndexInput
    {
        IByteBlockPool Pool { get; set; }
        int BufferUpTo { get; set; }
        byte[] Buffer { get; set; }
        int UpTo { get; set; }
        int Limit { get; set; }
        int Level { get; set; }
        int BufferOffset { get; set; }
        int EndIndex { get; set; }

        void Init(IByteBlockPool pool, int startIndex, int endIndex);
        bool EOF { get; }

        long WriteTo(IIndexOutput output);
        void NextSlice();
    }
}